
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Term Report</title>
        <style type="text/css">
            body { font-family: arial; font-size: 11pt;}
            h1 {margin: 0;}
            td { vertical-align: top}
            p {margin: 0; margin-top:12px; margin-bottom:7px;}
            p.ident {margin: 0; padding-left:2px; padding-top:2px}
            .bakso {width: 760px; margin-bottom:20px;}
            .bakso td {}
            .box1 td {border: solid thin #888; margin-bottom: 0; padding: 5px 0;}
            .box3 td {border: solid thin #888; margin-bottom: 0; padding-bottom: 0; padding-top:5px;}
            .box1 p, .box3 p {padding-left: 7px; margin: 0; padding-bottom: 2px;}
            .box2 td, .box4 td  {border: solid thin #888; padding: 4px 7px 3px 7px;}
            .box2 p {margin: 0; padding: 0; margin-bottom: 5px;}
            .es td {border: none;border-top: solid thin #888;  padding: 0px 7px; padding-top: 3px;}
            .es2 td {border: none;border-top: solid thin #888;  padding: 5px 7px;  }
            .es2 p {padding-left: 0;  }
            .es p {padding-left: 0; margin: 0; padding-top: 2px; padding-bottom: 0px;}
            .es { margin-top:2px;}
            .es2 { margin-top:5px;}
            table { border-collapse:collapse;}
            .bandung1 {width: 80px}
            .bandung2 {width: 180px}
            .bandung3 {width: 65px}
            .bandung4 {width: 85px}
            #logocic { width:90px; height:auto; float:right}
            #logoterm { width:auto; height:50px; float:right; margin-right: 10px;}
            .essai {font-family: essai; padding-top:15; font-size:28pt; }
            .metro {width: 33%}
        </style>
    </head>

    <body>
        <p class="ih atasp">ComLabs USDI ITB | Presensi Peserta Pelatihan Reguler | Term <?php echo $this->session->userdata('term') . ' ' . $this->session->userdata('tahun') ?></p>

        <!---->
        <table class="bakso" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <h1 class="essai">Daily Report</h1>
                    <p class="ident"><?php echo $hari.', '.$tgl?></p>

                </td>
                <td width="130">
                    <img id="logoterm" src="<?php echo $term['LOGO_TERM']?>"/>
                </td>
                <td width="100">
                    <img id="logocic" src="<?php echo base_url()?>images/logocic.png" />
                </td>
            </tr>
        </table>
        <!---->

        <table class="bakso" border="0" cellpadding="0" cellspacing="0" >
            <tr>
                <td><!--box1-->
                    <p>Summary</p>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box1">
                        <tr>
                            <td>
                                <p>Total Transaksi</p>
                                <p><strong><?php echo count($transaksi)?> Transaksi</strong></p></td>
                            <td>
                                <p>Total Cash Flow</p>
                                <p><strong>Rp <?php echo number_format($uang_masuk,0,'.',',')?></strong></p>
                                <!---->
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="es">
                                    <tr>
                                        <td>
                                            <p>Masuk</p>
                                            <p>Rp <?php echo number_format($uang_masuk,0,'.',',')?></p>

                                        </td>
                                        <td>
                                            <p>Keluar</p>
                                            <p>Rp <?php echo number_format($uang_keluar,0,'.',',')?></p>

                                        </td>
                                    </tr>
                                </table>
                                <!---->
                            </td>
                            <td>
                                <p>Petugas</p>
                                <p><strong><?php echo count($fo)?> Orang</strong></p>
                                <!---->
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="es">
                                    <tr>
                                        <td>
                                            <?php foreach($fo as $nama=>$jumlah){?>
                                            <p><?php echo $nama.' —'.$jumlah?></p>
                                            <?php } ?>
                                        </td>
                                    </tr>
                                </table>
                                <!---->
                            </td>
                        </tr>
                    </table>
                </td><!--box1-->
            </tr>
            <tr>
                <td><!--box2-->
                    <p>Details Transaksi</p>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box2">
                        <tr>
                            <td>Time</td>
                            <td>Jenis Transaksi</td>
                            <td>Jumlah</td>
                            <td>Atas Nama</td>
                            <td>Pelatihan</td>
                            <td>Petugas</td>
                        </tr>
                        <?php foreach($transaksi as $t){?>
                        <tr>
                            <td><?php echo $t['waktu']?></td>
                            <td><?php echo $t['jenis']?></td>
                            <td>
                                <?php 
                                    if($t['jenis']=='Pengembalian'){
                                        echo '(-)';
                                    }
                                ?>
                                Rp <?php echo number_format($t['jumlah'],0,'.',',')?>
                            </td>
                            <td><?php echo $t['nama']?></td>
                            <td><?php echo $t['kode'].'-'.$t['angkatan']?></td>
                            <td><?php echo $t['nama_fo']?></td>
                        </tr>
                        <?php } ?>
                    </table>
                </td><!--box2-->
            </tr>
            <tr>
                <td>        <p>
                        This Report Generated Automatically Under ComLabs IT Course Information System
                        <br/>
                        Printed on <?php echo date('l j, F Y, H.i A')?>, By: <?php echo $nama_fo?>
                    </p></td>
            </tr>
        </table>
        <!---->

    </body>
</html>
